Source Matching and Rewriting for MLIR Using String-Based Automata

نویسندگان

چکیده

A typical compiler flow relies on a uni-directional sequence of translation/optimization steps that lower the program abstract representation, making it hard to preserve higher-level information across each transformation step. On other hand, modern ISA extensions and hardware accelerators can benefit from compiler’s ability detect raise idioms acceleration instructions or optimized library calls. Although recent works based Multi-Level IR (MLIR) have been proposed for code raising, they rely specialized languages, recompilation, in-depth dialect knowledge. This article presents Source Matching Rewriting (SMR), user-oriented source-code-based approach MLIR idiom matching rewriting does not require expert’s intervention. SMR uses two-phase automaton-based DAG-matching algorithm inspired by early work tree-pattern matching. First, Control-Dependency Graph (CDG) is matched against program’s CDG rule out fragments do control-flow structure similar desired idiom. Second, candidate previous phase their Data-Dependency Graphs (DDGs) constructed DDG. Experimental results show effectively match Fortran (FIR) C (CIL) programs while raising them as BLAS calls improve performance. Additional experiments also performance improvements when using enable replacement in areas like approximate computing acceleration.

برای دانلود باید عضویت طلایی داشته باشید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Imperfect String Matching Experience Using Deformed Fuzzy Automata

This paper presents a string matching experience using deformed fuzzy automata for the recognition of imperfect strings. We propose an algorithm based on a deformed fuzzy automaton that calculates a similarity value between strings having a non-limited number of edition errors. Different selections of the fuzzy operators for computing the deformed fuzzy automaton transitions allows to obtain di...

متن کامل

Using Edit Automata for Rewriting-Based Security Enforcement

Execution monitoring (EM) is a widely adopted class of security mechanisms. EM-enforceable security properties are usually characterized by security automata and their derivatives. However Edit automata (EA) have been recently proposed to specify more powerful EMs. Being able to feign the execution of sensitive program actions, these EMs are supposed to enforce more security properties. However...

متن کامل

Approximate String Matching by Finite Automata

Abs t r ac t . Approximate string matching is a sequential problem and therefore it is possible to solve it using finite automata. A nondeterministic finite automaton is constructed for string matching with k mismatches. It is shown, how "dynamic programming" and "shift-and" based algorithms simulate this nondeterministic finite automaton. The corresponding deterministic finite automaton have O...

متن کامل

Fast approximate string matching with finite automata

We present a fast algorithm for finding approximate matches of a string in a finite-state automaton, given some metric of similarity. The algorithm can be adapted to use a variety of metrics for determining the distance between two words.

متن کامل

Approximate String Matching by Fuzzy Automata

We explain new ways of constructing search algorithms using fuzzy sets and fuzzy automata. This technique can be used to search or match strings in special cases when some pairs of symbols are more similar to each other than the others. This kind of similarity can’t be handled by usual searching algorithms. We present sample situations, which would use this kind of searching. Then we define a f...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: ACM Transactions on Architecture and Code Optimization

سال: 2023

ISSN: ['1544-3973', '1544-3566']

DOI: https://doi.org/10.1145/3571283